<template>
    <div class="topTabbar">
        <div class="main">
            <span>{{title}}</span>
        </div>
<!--        <span v-if="!isActive" @click="goBack">-->
<!--            <img class="backButton" src="../../../assets/img/home/back.png" alt="">-->
<!--        </span>-->
<!--        <div class="weather">-->
<!--            <iframe ref="abc" name="abc" id="abc" allowtransparency="true" frameborder="0" width="310" height="28" scrolling="no" src="//tianqi.2345.com/plugin/widget/index.htm?s=3&z=1&t=0&v=0&d=1&bd=0&k=&f=80ff80&ltf=80ff80&htf=80ff80&q=1&e=0&a=0&c=60037&w=317&h=28&align=center"></iframe>-->
<!--        </div>-->
    </div>
</template>

<script>
    export default {
        inject:['reload'],
        name: "topTabbar",
        data() {
            return {
                timer: null, //天气定时器
            }
        },
        props: {
            path: String,
            title: {
                type: String,
                default: "页面标题"
            }
        },
        computed: {
            isActive() {
                return this.$route.path.indexOf("home") !== -1
            },
        },
        mounted(){
            var that = this
            // this.$refs.abc.style.fontSize='30rem';
            // window.frames.abc.document.body.style.fontSize = 100 + 'px';
            //修改大小dao
            // that.timer = setInterval(() => {
            //     this.reload();
            // },21600000);
        },
        // beforeDestroy() {
        //     if(this.timer) { //如果定时器还在运行 或者直接关闭，不用判断
        //         clearInterval(this.timer); //关闭
        //     }
        // },
        methods: {
            goBack() {
                this.$router.back()
            }
        }
    }
</script>

<style>
    .topTabbar {
        width: 1920px;
        height: 160px;
        position: relative;
        line-height: 160px;
        color: var(--color-high-text);
        padding-top: 20px;
        margin: 0 auto;
    }

    .backButton {
        width: 90px;
        height: 90px;
        position: absolute;
        top: 25px;
        right: 120px;
        z-index: 888;
        font-size: 40px;
    }

    .main {
        width: 1920px;
        text-align: center;
        background: url("../../../assets/img/home/topTbabbar_bg.png") no-repeat center center;
        background-size: 1298px 95px;
        font-size: 43px;
        margin: 0 auto;
    }

    .main span {
        position: relative;
        top: -29px;
    }

    /*天气*/
    .weather{
        white-space: nowrap;
        margin:auto 0;
        text-align: center;
        font-size: 20px;
        position: absolute;
        width:100%;
        top: 48px;
        left:0%;
        font-size: 20px;
    }

</style>
